package com.ostrich.cloud.ostrichDistributionWeb.client;


import com.ostrich.cloud.common.result.Result;
import com.ostrich.cloud.ostrichDistributionService.client.param.PageSelectForm;
import com.ostrich.cloud.ostrichDistributionWeb.client.param.UpdateForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
* name是项目名，contextId是client的名字
*/
@FeignClient(contextId = "ostrichDistributionWeb",name="ostrichDistributionWeb")
public interface RiderClient {
    //登陆
    @GetMapping("doLogin")
    public Result login(@RequestParam("name") String name, @RequestParam("password") String pwd);
    //查看个人信息
    @GetMapping("get")
    public Result getInfo(@RequestParam("riderId") Integer rid);
    //修改个人信息
    @PostMapping("update")
    public Result reInfo(@RequestBody UpdateForm updateForm);
    //查看余额
    @GetMapping("getbanlance")
    public Result getbanlance();
    //确认送达
    @GetMapping("toWay")
    public Result toWay(@RequestParam("riderId") Integer rid);


    @PostMapping("getDeliveryOrder")
    public Result getDeliveryOrder(@RequestBody PageSelectForm pageSelectForm);

}
